<%@ page contentType="text/html; charset=utf-8" language="java"  import="java.sql.PreparedStatement,com.DbSQL,java.sql.ResultSet"
    pageEncoding="utf-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
String account = (String)session.getAttribute("user");//活动登陆系统的人
PreparedStatement p = DbSQL.getpreparestm("SELECT `type`,post_num,p.content,theme,p.time,nickname"+
" FROM post p,topic t,user1 u WHERE u.account=p.account AND t.topic_num=p.topic_num AND"+
" p.account IN(SELECT account2 FROM user_user WHERE account1 =?) ORDER BY p.time DESC");
System.out.println(""+account);
p.setString(1,account);
ResultSet rs = p.executeQuery();
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="css1.css"/>
<title>个性动态</title>
</head>

<body>
<center>
<a href="/xiaonei1227/dl.jsp">返回</a>
<h1>个性动态</h1>
</center>
<center>
<%while(rs!=null&&rs.next()){%>
<div class='tie'>
       <div class='tie1' align="left">
       <br/>
		   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;好朋友<font color="#ff0000"><%=rs.getString(6)%>
		   </font>的动态<br/>
		   <B>&nbsp;&nbsp;&nbsp;[<%=rs.getString(1)%>]&nbsp;&nbsp;&nbsp;
		     <a href="/xiaonei1227/tiezi.jsp?post_Num=<%=rs.getString(2)%>"><%=rs.getString(4)%></a>
		   </B><br />
          &nbsp;&nbsp;&nbsp;<%=rs.getString(3)%><br />
         <%=rs.getString(5)%>
	   </div>
</div>

<%}%>
</center>
</body>
</html>